package com.qike.duola.enums;

/**
 * 退料转料类型
 *
 */
public enum ReturnTransferEnums {
    TRANSFER                 (1,"盘盈转料"),
    ALL_TRANSFER                      (2,"整车转料"),
    WASTE                      (3,"废料"),
    ;
    private Integer ecode;

    private String emsg;

    ReturnTransferEnums(Integer ecode, String emsg) {
        this.ecode = ecode;
        this.emsg = emsg;
    }

    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }

    public static ReturnTransferEnums statOf(Integer ecode) {
        for (ReturnTransferEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }
}
